import Cookies from 'js-cookie'

export function getToken (key = 'token') {
  return Cookies.get(key)
}

export function setToken (key, token) {
  return Cookies.set(key, token, { expires: 1 })
}

export function removeToken (keys = ['token', 'refreshToken']) {
  keys.forEach(key => {
    Cookies.remove(key)
  })
}
